package czu.caohao.dao;

import czu.caohao.pojo.DBServer;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface DBServerRepository extends JpaRepository<DBServer, Integer> {
    @Query("select id from db_server where server_ip = ?1 and server_port = ?2")
    public Integer getDBServerByIpAndPort(String ip,Integer port);
}
